package com.ruoyi.system.domain.dto;

import com.ruoyi.system.domain.TbTaskTarget;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@Schema(description = "任务创建参数")
public class TaskCreateDTO {

    // 基础信息
    @NotBlank(message = "任务名称不能为空")
    @Schema(description = "任务名称")
    private String taskName;
    @Schema(description = "任务描述")
    private String taskDescription;

    @Schema(description = "任务优先级  1=高 2=中 3=低")
    private Integer taskPriority;

    // 推送选项
    @Schema(description = "强制退出应用并更新")
    private Integer forceQuitApp = 0;   // 强制退出应用并更新
    @Schema(description = "不兼容设备更新")
    private Integer updateIncompatible = 0; // 不兼容设备更新
    @Schema(description = "自动重试")
    private Integer autoRetry = 0; // 安装失败自动重试
    @Schema(description = "覆盖设备已版本")
    private Integer overwriteExist = 0; // 覆盖设备已版本
    @Schema(description = "立即推送")
    private Integer immediatePush = 1; // 立即推送
    @Schema(description = "定时推送")
    private Date scheduledPushTime; // 定时推送时间

    @Schema(description = "推送项")
    private List<ItemDTO> items;

    @Schema(description = "设备编号列表")
    private List<String> devSNs;

    @Schema(description = "飞机编号列表")
    private List<String> planeCodes;
}
